Skip to content

Commit 2d6d921

Browse files
committed
key: make key material fields public
1 parent 9b04ad6 commit 2d6d921

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

src/key.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -412,38 +412,38 @@ pub enum KeyEncryptionMethod {
412412

413413
#[derive(Clone, Debug)]
414414
pub struct RsaPublicKey {
415-
n: BigUint,
416-
e: BigUint,
415+
pub n: BigUint,
416+
pub e: BigUint,
417417
}
418418

419419
#[derive(Clone, Debug)]
420420
pub struct RsaPrivateKey {
421-
d: BigUint,
422-
p: BigUint,
423-
q: BigUint,
424-
u: BigUint,
421+
pub d: BigUint,
422+
pub p: BigUint,
423+
pub q: BigUint,
424+
pub u: BigUint,
425425
}
426426

427427
#[derive(Clone, Debug)]
428428
pub struct DsaPublicKey {
429-
p: BigUint,
430-
q: BigUint,
431-
g: BigUint,
432-
y: BigUint,
429+
pub p: BigUint,
430+
pub q: BigUint,
431+
pub g: BigUint,
432+
pub y: BigUint,
433433
}
434434

435435
#[derive(Clone, Debug)]
436-
pub struct DsaPrivateKey(BigUint);
436+
pub struct DsaPrivateKey(pub BigUint);
437437

438438
#[derive(Clone, Debug)]
439439
pub struct ElgamalPublicKey {
440-
p: BigUint,
441-
g: BigUint,
442-
y: BigUint,
440+
pub p: BigUint,
441+
pub g: BigUint,
442+
pub y: BigUint,
443443
}
444444

445445
#[derive(Clone, Debug)]
446-
pub struct ElgamalPrivateKey(BigUint);
446+
pub struct ElgamalPrivateKey(pub BigUint);
447447

448448
#[derive(Debug, Fail)]
449449
pub enum KeyError {

0 commit comments

Comments
 (0)