pub struct Issuer { /* private fields */ }
Expand description
The Issuer represents here the government issuer in Swiyu, which can create new credentials for the Holder (MobilePhones). Each new credential is bound to the public key sent by the holder. An Issuer has a private key to sign credentials for the holders. The certificate of the issuer, the public key, can be used by the Verifier to check that a certificate has been created by the Issuer
Implementations§
Source§impl Issuer
impl Issuer
Sourcepub fn new(setup: PublicSetup) -> Self
pub fn new(setup: PublicSetup) -> Self
Create a new issuer with a new keypair.
Sourcepub fn get_certificate(&self) -> PublicKeyG2<Bls12_381>
pub fn get_certificate(&self) -> PublicKeyG2<Bls12_381>
Returns the certificate of the Issuer - in this case the public key.
Sourcepub fn new_credential(&mut self, key_pub: SecP256Affine) -> VerifiedCredential
pub fn new_credential(&mut self, key_pub: SecP256Affine) -> VerifiedCredential
Creates a new BBS credential using the coordinates of the holder’s public key as the first two
messages.
The real issuer would request a proof that the holder has been authenticated and has the right
to request a credential.
In our case it adds a first
and last
to the messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Issuer
impl RefUnwindSafe for Issuer
impl Send for Issuer
impl Sync for Issuer
impl Unpin for Issuer
impl UnwindSafe for Issuer
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more