Alex Klyubin bdc1382ac5 Switch from getSpi to getCurrentSpi.
Crypto primitives' getSpi has a side-effect which modifies the state
of the primitive: it selects an SPI implementation if it hasn't been
selected yet (e.g., Cipher.getInstance("AES") doesn't select an SPI
implementation until Cipher.init). The new method getCurrentSpi has
no side-effects: it simply returns null if no SPI implementation is
selected. The switch to getCurrentSpi lets us avoid side-effects and
throw a more pertinent exception when no SPI is yet selected.

Bug: 18088752
Change-Id: I6d62eb67f904a15782673d16bcdae240cdc8f979
2015-05-18 09:54:54 -07:00
..