Class ShamirSplitSecret
- java.lang.Object
-
- org.bouncycastle.crypto.threshold.ShamirSplitSecret
-
- All Implemented Interfaces:
SplitSecret
public class ShamirSplitSecret extends java.lang.Object implements SplitSecret
-
-
Constructor Summary
Constructors Constructor Description ShamirSplitSecret(ShamirSecretSplitter.Algorithm algorithm, ShamirSecretSplitter.Mode mode, ShamirSplitSecretShare[] secretShares)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShamirSplitSecretdivide(int div)byte[]getSecret()Recombines secret shares to reconstruct the original secret.ShamirSplitSecretShare[]getSecretShares()ShamirSplitSecretmultiple(int mul)
-
-
-
Constructor Detail
-
ShamirSplitSecret
public ShamirSplitSecret(ShamirSecretSplitter.Algorithm algorithm, ShamirSecretSplitter.Mode mode, ShamirSplitSecretShare[] secretShares)
-
-
Method Detail
-
getSecretShares
public ShamirSplitSecretShare[] getSecretShares()
- Specified by:
getSecretSharesin interfaceSplitSecret
-
multiple
public ShamirSplitSecret multiple(int mul) throws java.io.IOException
- Throws:
java.io.IOException
-
divide
public ShamirSplitSecret divide(int div) throws java.io.IOException
- Throws:
java.io.IOException
-
getSecret
public byte[] getSecret() throws java.io.IOExceptionDescription copied from interface:SplitSecretRecombines secret shares to reconstruct the original secret.- Specified by:
getSecretin interfaceSplitSecret- Returns:
- A byte array containing the reconstructed secret.
- Throws:
java.io.IOException
-
-