pub struct Device { /* private fields */ }
Expand description
Represents PlayReady device. Usually created from .prd file.
Implementations§
Source§impl Device
impl Device
Sourcepub fn new(
group_key: Option<SigningKey>,
encryption_key: Keypair<Generic<NistP256>>,
signing_key: SigningKey,
cert_chain: CertificateChain,
) -> Self
pub fn new( group_key: Option<SigningKey>, encryption_key: Keypair<Generic<NistP256>>, signing_key: SigningKey, cert_chain: CertificateChain, ) -> Self
Creates new Device
.
Sourcepub fn signing_key(&self) -> &SigningKey
pub fn signing_key(&self) -> &SigningKey
Returns device signing key.
Sourcepub fn encryption_key(&self) -> &Keypair<Generic<NistP256>>
pub fn encryption_key(&self) -> &Keypair<Generic<NistP256>>
Returns device encryption key.
Sourcepub fn group_certificate(&self) -> &[u8] ⓘ
pub fn group_certificate(&self) -> &[u8] ⓘ
Returns device group certificate.
Sourcepub fn name(&self) -> Result<String, Error>
pub fn name(&self) -> Result<String, Error>
Returns name of the device parsed from certificate chain.
Sourcepub fn security_level(&self) -> Result<u32, Error>
pub fn security_level(&self) -> Result<u32, Error>
Returns security level (SL????) of the device parsed from certificate chain.
Sourcepub fn verify_certificates(&self) -> Result<(), Error>
pub fn verify_certificates(&self) -> Result<(), Error>
Performs signature verification of certificates bundled in CertificateChain
.
Sourcepub fn provision(
cert_chain: CertificateChain,
group_key: SigningKey,
) -> Result<Self, Error>
pub fn provision( cert_chain: CertificateChain, group_key: SigningKey, ) -> Result<Self, Error>
Creates and provisions device from certificate chain and group key.
Sourcepub fn reprovision(self) -> Result<Self, Error>
pub fn reprovision(self) -> Result<Self, Error>
Generates reprovisioned Device
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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