pub struct RsaVerificationKey2018 {
pub id: IriBuf,
pub controller: UriBuf,
pub public_key: Box<JWK>,
}Expand description
RSA verification key 2018.
To be used with the RSA Signature Suite 2018.
See: https://www.w3.org/TR/did-spec-registries/#rsaverificationkey2018
Fields§
§id: IriBufKey identifier.
controller: UriBufKey crontroller.
public_key: Box<JWK>Public JSON Web Key.
Implementations§
source§impl RsaVerificationKey2018
impl RsaVerificationKey2018
pub const NAME: &'static str = RSA_VERIFICATION_KEY_2018_TYPE
pub const IRI: &'static Iri = _
pub fn public_key_jwk(&self) -> &JWK
pub fn sign_bytes( &self, data: &[u8], secret_key: &JWK, ) -> Result<Vec<u8>, MessageSignatureError>
pub fn verify_bytes( &self, data: &[u8], signature: &[u8], ) -> Result<ProofValidity, ProofValidationError>
Trait Implementations§
source§impl Clone for RsaVerificationKey2018
impl Clone for RsaVerificationKey2018
source§fn clone(&self) -> RsaVerificationKey2018
fn clone(&self) -> RsaVerificationKey2018
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RsaVerificationKey2018
impl Debug for RsaVerificationKey2018
source§impl<'de> Deserialize<'de> for RsaVerificationKey2018
impl<'de> Deserialize<'de> for RsaVerificationKey2018
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<RsaVerificationKey2018> for AnyJwkMethod
impl From<RsaVerificationKey2018> for AnyJwkMethod
Deprecated verification method for the RsaSignature2018 suite.
source§fn from(value: RsaVerificationKey2018) -> Self
fn from(value: RsaVerificationKey2018) -> Self
Converts to this type from the input type.
source§impl From<RsaVerificationKey2018> for AnyMethod
impl From<RsaVerificationKey2018> for AnyMethod
Deprecated verification method for the RsaSignature2018 suite.
source§fn from(value: RsaVerificationKey2018) -> Self
fn from(value: RsaVerificationKey2018) -> Self
Converts to this type from the input type.
source§impl Hash for RsaVerificationKey2018
impl Hash for RsaVerificationKey2018
source§impl<I_, V_> LinkedData<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedData<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
source§impl<I_, V_> LinkedDataDeserializePredicateObjects<I_, V_> for RsaVerificationKey2018where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
Box<JWK>: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
impl<I_, V_> LinkedDataDeserializePredicateObjects<I_, V_> for RsaVerificationKey2018where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
Box<JWK>: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
fn deserialize_objects_in<'de_, D_>( vocabulary: &V_, interpretation: &I_, dataset: &D_, graph: Option<&I_::Resource>, objects: impl IntoIterator<Item = &'de_ I_::Resource>, context: Context<'_, I_>, ) -> Result<Self, FromLinkedDataError>
fn deserialize_objects<'a, D>(
vocabulary: &V,
interpretation: &I,
dataset: &D,
graph: Option<&<I as Interpretation>::Resource>,
objects: impl IntoIterator<Item = &'a <I as Interpretation>::Resource>,
) -> Result<Self, FromLinkedDataError>where
<I as Interpretation>::Resource: 'a,
D: PatternMatchingDataset<Resource = <I as Interpretation>::Resource>,
source§impl<I_, V_> LinkedDataDeserializeSubject<I_, V_> for RsaVerificationKey2018where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
Box<JWK>: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
impl<I_, V_> LinkedDataDeserializeSubject<I_, V_> for RsaVerificationKey2018where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
Box<JWK>: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
fn deserialize_subject_in<D_>(
vocabulary_: &V_,
interpretation_: &I_,
dataset_: &D_,
graph_: Option<&I_::Resource>,
resource_: &I_::Resource,
context_: Context<'_, I_>,
) -> Result<Self, FromLinkedDataError>where
D_: PatternMatchingDataset<Resource = I_::Resource>,
fn deserialize_subject<D>( vocabulary: &V, interpretation: &I, dataset: &D, graph: Option<&<I as Interpretation>::Resource>, resource: &<I as Interpretation>::Resource, ) -> Result<Self, FromLinkedDataError>
source§impl<I_, V_> LinkedDataGraph<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataGraph<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn visit_graph<S_>(&self, visitor: S_) -> Result<S_::Ok, S_::Error>where
S_: GraphVisitor<I_, V_>,
source§impl<I_, V_> LinkedDataPredicateObjects<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataPredicateObjects<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn visit_objects<S_>(&self, visitor: S_) -> Result<S_::Ok, S_::Error>where
S_: PredicateObjectsVisitor<I_, V_>,
source§impl<I_, V_> LinkedDataResource<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataResource<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn interpretation( &self, vocabulary: &mut V_, interpretation: &mut I_, ) -> ResourceInterpretation<'_, I_, V_>
fn reference_interpretation( &self, vocabulary: &mut V, interpretation: &mut I, ) -> ResourceInterpretation<'_, I, V>
source§impl<I_, V_> LinkedDataSubject<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataSubject<I_, V_> for RsaVerificationKey2018where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
Box<JWK>: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn visit_subject<S_>(&self, visitor: S_) -> Result<S_::Ok, S_::Error>where
S_: SubjectVisitor<I_, V_>,
source§impl PartialEq for RsaVerificationKey2018
impl PartialEq for RsaVerificationKey2018
source§impl Serialize for RsaVerificationKey2018
impl Serialize for RsaVerificationKey2018
source§impl TryFrom<AnyJwkMethod> for RsaVerificationKey2018
impl TryFrom<AnyJwkMethod> for RsaVerificationKey2018
Deprecated verification method for the RsaSignature2018 suite.
§type Error = InvalidVerificationMethod
type Error = InvalidVerificationMethod
The type returned in the event of a conversion error.
source§impl TryFrom<AnyMethod> for RsaVerificationKey2018
impl TryFrom<AnyMethod> for RsaVerificationKey2018
Deprecated verification method for the RsaSignature2018 suite.
source§impl TryFrom<GenericVerificationMethod> for RsaVerificationKey2018
impl TryFrom<GenericVerificationMethod> for RsaVerificationKey2018
§type Error = InvalidVerificationMethod
type Error = InvalidVerificationMethod
The type returned in the event of a conversion error.
source§impl TypedVerificationMethod for RsaVerificationKey2018
impl TypedVerificationMethod for RsaVerificationKey2018
fn expected_type() -> Option<ExpectedType>
fn type_match(ty: &str) -> bool
impl Eq for RsaVerificationKey2018
impl StructuralPartialEq for RsaVerificationKey2018
Auto Trait Implementations§
impl Freeze for RsaVerificationKey2018
impl RefUnwindSafe for RsaVerificationKey2018
impl Send for RsaVerificationKey2018
impl Sync for RsaVerificationKey2018
impl Unpin for RsaVerificationKey2018
impl UnwindSafe for RsaVerificationKey2018
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
fn deserialize_typed<S>(
_: &C,
deserializer: S,
) -> Result<T, <S as Deserializer<'de>>::Error>where
S: Deserializer<'de>,
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
source§impl<M> MaybeJwkVerificationMethod for Mwhere
M: JwkVerificationMethod,
impl<M> MaybeJwkVerificationMethod for Mwhere
M: JwkVerificationMethod,
source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T.