(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 13.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 68558, 1824] NotebookOptionsPosition[ 62482, 1677] NotebookOutlinePosition[ 64242, 1729] CellTagsIndexPosition[ 64199, 1726] WindowTitle->AffineDecipher | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->462042388], Cell["Convert a simple text:", "Text", TaggingRules->{}, CellChangeTimes->{{3.774026255909501*^9, 3.7740262599646473`*^9}}, CellID->13078159], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{"\"\\"", ",", RowBox[{"{", RowBox[{"5", ",", "8"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.77402623187598*^9, 3.774026245315583*^9}, { 3.774030340910741*^9, 3.7740303443696203`*^9}}, CellLabel->"In[1]:=", CellID->443871870], Cell[BoxData["\<\"affine cipher\"\>"], "Output", TaggingRules->{}, CellChangeTimes->{3.77402624561162*^9, 3.774028380117144*^9, 3.774030344873848*^9, 3.7740306774881372`*^9}, CellLabel->"Out[1]=", CellID->416970050] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Scope", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->964056545], Cell[TextData[{ Cell[BoxData[ StyleBox["AffineDecipher", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " automatically maps over a list of strings:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.774026264150811*^9, 3.774026294620573*^9}, { 3.774030656414311*^9, 3.7740306812709913`*^9}, {3.7771327780378637`*^9, 3.7771327784817305`*^9}}, CellID->649685796], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.774026266109355*^9, 3.774026279825412*^9}, { 3.7740303491742077`*^9, 3.774030351686954*^9}}, CellLabel->"In[1]:=", CellID->836153427], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"this\"\>", ",", "\<\"is\"\>", ",", "\<\"a\"\>", ",", "\<\"test\"\>"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.774026295800805*^9, 3.774028382604868*^9, 3.774030352247116*^9, 3.7740306784999866`*^9, 3.7742012605347424`*^9}, CellLabel->"Out[1]=", CellID->1077239643] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->2013219385], Cell["Create an operator:", "Text", TaggingRules->{}, CellChangeTimes->{{3.774026346609743*^9, 3.7740263490769167`*^9}}, CellID->1191067918], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"op", "=", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{"{", RowBox[{"5", ",", "8"}], "}"}], "]"}]}]], "Input", TaggingRules->{}, CellChangeTimes->{ 3.774026343354988*^9, {3.774028389265773*^9, 3.774028389860569*^9}, { 3.774030356004916*^9, 3.774030356838315*^9}}, CellLabel->"In[1]:=", CellID->1709628525], Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {2., 9.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {2., 9.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{"{", RowBox[{"5", ",", "8"}], "}"}], "]"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.7740263436324387`*^9, 3.774026351341106*^9}, { 3.77402838724936*^9, 3.7740283903550787`*^9}, 3.774030357540941*^9, 3.774030682790989*^9}, CellLabel->"Out[1]=", CellID->1716693949] }, Open ]], Cell["Apply the operator to a string:", "Text", TaggingRules->{}, CellChangeTimes->{{3.774026353389999*^9, 3.774026358327648*^9}, { 3.774028397141811*^9, 3.774028399352667*^9}}, CellID->1517392688], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"op", "[", "\"\\"", "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.77402636139249*^9, 3.774026365667818*^9}, { 3.7740283923520403`*^9, 3.77402839240458*^9}, {3.774030360178247*^9, 3.774030398767308*^9}}, CellLabel->"In[2]:=", CellID->93281775], Cell[BoxData["\<\"balloon\"\>"], "Output", TaggingRules->{}, CellChangeTimes->{{3.774030367901956*^9, 3.774030399289957*^9}, 3.774030683610972*^9}, CellLabel->"Out[2]=", CellID->388774260] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Properties and Relations", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->754506620], Cell[TextData[{ "The ", ButtonBox["Caesar decipher", BaseStyle->"Hyperlink", ButtonData->{ URL["https://resources.wolframcloud.com/FunctionRepository/resources/\ CaesarDecipher/"], None}, ButtonNote-> "https://resources.wolframcloud.com/FunctionRepository/resources/\ CaesarDecipher/"], " can be recreated using the affine decipher by choosing ", Cell[BoxData[ RowBox[{ StyleBox["a", "TI"], "=", "1"}]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.774027740092827*^9, 3.774027767998204*^9}, { 3.77402788990755*^9, 3.7740278960202227`*^9}, {3.7740304269578543`*^9, 3.774030430059396*^9}, {3.859473890049017*^9, 3.859473890051073*^9}}, CellID->1355312339], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"string", "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{"string", ",", RowBox[{"{", RowBox[{"1", ",", "8"}], "}"}]}], "]"}], ",", RowBox[{ RowBox[{"ResourceFunction", "[", "\"\\"", "]"}], "[", RowBox[{"string", ",", "8"}], "]"}]}], "}"}]}], "Input", TaggingRules->{}, CellChangeTimes->{{3.774027773714278*^9, 3.774027782124399*^9}, { 3.774027864160375*^9, 3.7740278828301573`*^9}, {3.774030413613031*^9, 3.77403042042108*^9}}, CellLabel->"In[1]:=", CellID->214837380], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"This is just a test\"\>", ",", "\<\"This is just a test\"\>"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.774027784162076*^9, {3.774027883183544*^9, 3.7740278981245604`*^9}, 3.774028401096837*^9, {3.774030421348971*^9, 3.77403043223382*^9}, 3.774030685103194*^9, 3.774201486194543*^9}, CellLabel->"Out[1]=", CellID->329472339] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->1954893124], Cell[TextData[{ Cell[BoxData[ StyleBox["AffineDecipher", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " could be recast in terms of the resource function ", ButtonBox["AffineCipher", BaseStyle->"Hyperlink", ButtonData->{ URL["https://resources.wolframcloud.com/FunctionRepository/resources/\ AffineCipher/"], None}, ButtonNote-> "https://resources.wolframcloud.com/FunctionRepository/resources/\ AffineCipher/"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.774201436435114*^9, 3.774201480388298*^9}, { 3.774201958620021*^9, 3.774202030212723*^9}, {3.859473945037899*^9, 3.8594739705484657`*^9}, 3.85947401923342*^9}, CellID->11581286], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"enciphered", "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{"deciphered", "=", RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{"enciphered", ",", RowBox[{"{", RowBox[{"5", ",", "8"}], "}"}]}], "]"}]}]}], "Input", TaggingRules->{}, CellChangeTimes->{{3.774201527613636*^9, 3.7742015681492968`*^9}, { 3.7742016055595627`*^9, 3.774201645454925*^9}}, CellLabel->"In[1]:=", CellID->928737305], Cell[BoxData["\<\"affine cipher\"\>"], "Output", TaggingRules->{}, CellChangeTimes->{3.774201610415642*^9, 3.774201648933895*^9}, CellLabel->"Out[1]=", CellID->1203680434] }, Open ]], Cell[TextData[{ "Again decipher, this time using ", Cell[BoxData["AffineCipher"], "InlineFormula", FontFamily->"Source Sans Pro"], " with appropriate parameter values for inverting:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.774201436435114*^9, 3.774201480388298*^9}, { 3.774201801400766*^9, 3.774201843978258*^9}, {3.774202021373785*^9, 3.7742020797988043`*^9}}, CellID->1719962267], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"minv", "=", RowBox[{"ModularInverse", "[", RowBox[{"5", ",", "26"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ResourceFunction", "[", "\"\\"", "]"}], "[", RowBox[{"enciphered", ",", RowBox[{"{", RowBox[{"minv", ",", RowBox[{ RowBox[{"-", "8"}], "minv"}]}], "}"}]}], "]"}]}], "Input", TaggingRules->{}, CellChangeTimes->{ 3.7742015379574957`*^9, {3.7742016615597982`*^9, 3.774201688607081*^9}, { 3.774201773464259*^9, 3.774201775641467*^9}}, CellLabel->"In[2]:=", CellID->780411667], Cell[BoxData["\<\"affine cipher\"\>"], "Output", TaggingRules->{}, CellChangeTimes->{3.774201706586789*^9, 3.77420192262321*^9}, CellLabel->"Out[2]=", CellID->847985670] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Possible Issues", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->92483860], Cell[TextData[{ "The parameter ", Cell[BoxData[ StyleBox["a", "TI"]], "InlineFormula", FontFamily->"Source Sans Pro"], " must be coprime to 26:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.774028177218919*^9, 3.774028186860744*^9}, { 3.7740282399447002`*^9, 3.774028263794128*^9}, 3.7740305050729647`*^9, { 3.774201858306147*^9, 3.774201863177924*^9}}, CellID->193044669], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AffineDecipher", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AffineDecipher"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AffineDecipher"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AffineDecipher"], BoxID -> "AffineDecipher", Selectable->False], "[", RowBox[{"\"\\"", ",", RowBox[{"{", RowBox[{"14", ",", "11"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.774028190134757*^9, 3.774028205530534*^9}, { 3.774030435089386*^9, 3.774030439352585*^9}, {3.774030487698758*^9, 3.774030499526746*^9}}, CellLabel->"In[1]:=", CellID->1662120386], Cell[BoxData[ TemplateBox[{ "AffineDecipher", "anotcoprime", "\"The value for a, \\!\\(\\*RowBox[{\\\"14\\\"}]\\), is not coprime with \ the alphabet length (26).\"", 2, 453, 26, 31653489040609130808, "Local", "Global`AffineDecipher"}, "MessageTemplate2"]], "Message", "MSG", TaggingRules->{}, CellChangeTimes->{3.774030499749845*^9, 3.774030686398102*^9}, CellLabel->"During evaluation of In[1]:=", CellID->1472604180], Cell[BoxData["$Failed"], "Output", TaggingRules->{}, CellChangeTimes->{{3.7740281980175657`*^9, 3.7740282059064913`*^9}, 3.7740282667728853`*^9, 3.774028403352206*^9, 3.7740304414519987`*^9, { 3.774030489546245*^9, 3.7740304997557898`*^9}, 3.774030686405623*^9}, CellLabel->"Out[1]=", CellID->309421585] }, Open ]], Cell[TextData[{ "Some of the permissible values for ", Cell[BoxData[ StyleBox["a", "TI"]], "InlineFormula", FontFamily->"Source Sans Pro"], " are:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.7740282811018963`*^9, 3.774028330132545*^9}, { 3.7740283634472837`*^9, 3.774028371044465*^9}}, CellID->56126421], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Select", "[", RowBox[{ RowBox[{"Range", "[", "100", "]"}], ",", RowBox[{ RowBox[{"CoprimeQ", "[", RowBox[{"#", ",", "26"}], "]"}], "&"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.77402821120833*^9, 3.77402823046299*^9}, { 3.774028331523863*^9, 3.774028356491476*^9}}, CellLabel->"In[2]:=", CellID->1672966393], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "3", ",", "5", ",", "7", ",", "9", ",", "11", ",", "15", ",", "17", ",", "19", ",", "21", ",", "23", ",", "25", ",", "27", ",", "29", ",", "31", ",", "33", ",", "35", ",", "37", ",", "41", ",", "43", ",", "45", ",", "47", ",", "49", ",", "51", ",", "53", ",", "55", ",", "57", ",", "59", ",", "61", ",", "63", ",", "67", ",", "69", ",", "71", ",", "73", ",", "75", ",", "77", ",", "79", ",", "81", ",", "83", ",", "85", ",", "87", ",", "89", ",", "93", ",", "95", ",", "97", ",", "99"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.774028226336073*^9, 3.7740282309417953`*^9}, 3.77402826843003*^9, {3.77402833751447*^9, 3.7740283724848747`*^9}, 3.774028405212462*^9, 3.774030510235918*^9, 3.7740306874928083`*^9}, CellLabel->"Out[2]=", CellID->77620149] }, Open ]] }, Closed]] }, ClosingSaveDialog->False, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"AffineDecipher | Example Notebook", Visible->False, FrontEndVersion->"13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions->Notebook[{ Cell[ StyleData[ StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb", CharacterEncoding -> "UTF-8"]]], Cell[ StyleData[All, "Working"], Editable -> True, DockedCells -> {}], Cell[ StyleData["Notebook"], Editable -> True, DockedCells -> {}, ScrollingOptions -> {"VerticalScrollRange" -> Automatic}], Cell[ StyleData[ "Section", StyleDefinitions -> StyleData["PrimaryExamplesSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Subsection", StyleDefinitions -> StyleData["ExampleSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsection", StyleDefinitions -> StyleData["ExampleSubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsubsection", StyleDefinitions -> StyleData["ExampleSubsubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Text", StyleDefinitions -> StyleData["ExampleText"]], Editable -> True]}, Visible -> False, FrontEndVersion -> "13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions -> "PrivateStylesheetFormatting.nb"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[627, 23, 168, 7, 70, "Subsection",ExpressionUUID->"cca040a7-a53d-4a01-b8c2-712c8765a275", CellID->462042388], Cell[798, 32, 144, 3, 70, "Text",ExpressionUUID->"909c48bc-ce4b-4e04-87e8-c3b417c01259", CellID->13078159], Cell[CellGroupData[{ Cell[967, 39, 7300, 184, 70, "Input",ExpressionUUID->"0eaf8b89-af37-40bf-b353-adc5abaaffa0", CellID->443871870], Cell[8270, 225, 222, 5, 70, "Output",ExpressionUUID->"af499209-099c-48c3-be6c-5d6b5bae89c7", CellID->416970050] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[8541, 236, 159, 7, 70, "Subsection",ExpressionUUID->"183b4739-4e35-4eff-a7b7-f729c1ae69af", CellID->964056545], Cell[8703, 245, 406, 10, 70, "Text",ExpressionUUID->"73c09e28-973e-475b-b30e-f0383adccf65", CellID->649685796], Cell[CellGroupData[{ Cell[9134, 259, 7400, 188, 70, "Input",ExpressionUUID->"97537129-bd34-4b3f-b557-20d59a349fe0", CellID->836153427], Cell[16537, 449, 336, 8, 70, "Output",ExpressionUUID->"f91e0ddc-b6d4-4294-a8f9-5fc77715b150", CellID->1077239643] }, Open ]], Cell[CellGroupData[{ Cell[16910, 462, 145, 4, 70, "ExampleDelimiter",ExpressionUUID->"542d6bf0-b64e-44ee-9800-3261c4a48dfa", CellID->2013219385], Cell[17058, 468, 143, 3, 70, "Text",ExpressionUUID->"388ed382-356c-43ad-8d21-5208ced60a8d", CellID->1191067918], Cell[CellGroupData[{ Cell[17226, 475, 7502, 187, 70, "Input",ExpressionUUID->"4f64b6f1-b165-43b1-bdfd-500e297ab525", CellID->1709628525], Cell[24731, 664, 7306, 184, 70, "Output",ExpressionUUID->"add7ffcf-1438-4b13-b92e-36270879e324", CellID->1716693949] }, Open ]], Cell[32052, 851, 202, 4, 70, "Text",ExpressionUUID->"c7eeccae-9c4e-4205-b38f-79d1885d3a43", CellID->1517392688], Cell[CellGroupData[{ Cell[32279, 859, 294, 7, 70, "Input",ExpressionUUID->"3e36da0e-4938-418e-b0da-854f8cf01417", CellID->93281775], Cell[32576, 868, 196, 5, 70, "Output",ExpressionUUID->"c8f8964d-3bd0-470d-bdca-1f8e1589eee0", CellID->388774260] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[32833, 880, 178, 7, 70, "Subsection",ExpressionUUID->"93f1652a-8052-456e-adf5-814eb7508b48", CellID->754506620], Cell[33014, 889, 746, 21, 70, "Text",ExpressionUUID->"be1ae608-3de5-4c5b-9f44-5b8c58fdc5a2", CellID->1355312339], Cell[CellGroupData[{ Cell[33785, 914, 7971, 195, 70, "Input",ExpressionUUID->"fa279e72-5534-4734-a9fb-977c83e2c0aa", CellID->214837380], Cell[41759, 1111, 402, 10, 70, "Output",ExpressionUUID->"ddb539a9-9c12-4e22-bfed-2c7a40e86a1f", CellID->329472339] }, Open ]], Cell[CellGroupData[{ Cell[42198, 1126, 145, 4, 70, "ExampleDelimiter",ExpressionUUID->"630ade22-6659-44b3-904d-f930afc43f5e", CellID->1954893124], Cell[42346, 1132, 708, 19, 70, "Text",ExpressionUUID->"fe674c61-0de5-4ad5-8933-c149f127b824", CellID->11581286], Cell[CellGroupData[{ Cell[43079, 1155, 7624, 190, 70, "Input",ExpressionUUID->"7dc17147-2b61-41e9-a025-62a754deb5aa", CellID->928737305], Cell[50706, 1347, 175, 4, 70, "Output",ExpressionUUID->"9c8e8a05-36c9-4bae-8b0d-c6c58fb817b2", CellID->1203680434] }, Open ]], Cell[50896, 1354, 405, 10, 70, "Text",ExpressionUUID->"8e1f0692-01ba-4d14-b6e2-b26b446c4b98", CellID->1719962267], Cell[CellGroupData[{ Cell[51326, 1368, 594, 17, 70, "Input",ExpressionUUID->"7254082f-bee4-4168-8259-e71008e44603", CellID->780411667], Cell[51923, 1387, 173, 4, 70, "Output",ExpressionUUID->"fec6d171-7f3e-48b7-b5c4-ae3b14965152", CellID->847985670] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[52157, 1398, 168, 7, 70, "Subsection",ExpressionUUID->"1eba6a9e-8097-45b5-bf9d-e2d5a75ccf99", CellID->92483860], Cell[52328, 1407, 394, 11, 70, "Text",ExpressionUUID->"9129a2c5-6f91-4d1f-aa15-a683e11c8645", CellID->193044669], Cell[CellGroupData[{ Cell[52747, 1422, 7352, 185, 70, "Input",ExpressionUUID->"a9bb5443-f57e-44cc-862b-8044283c5e8b", CellID->1662120386], Cell[60102, 1609, 436, 10, 70, "Message",ExpressionUUID->"05ca6e40-f098-4aa8-b327-494ff9770620", CellID->1472604180], Cell[60541, 1621, 314, 6, 70, "Output",ExpressionUUID->"dcbfa9b9-e074-4110-9935-3ba30241c061", CellID->309421585] }, Open ]], Cell[60870, 1630, 323, 10, 70, "Text",ExpressionUUID->"d023e95e-f8c5-4b4e-83d2-ab1463206b9c", CellID->56126421], Cell[CellGroupData[{ Cell[61218, 1644, 376, 11, 70, "Input",ExpressionUUID->"f353aaaa-6d74-4900-84c9-48e711cccfe3", CellID->1672966393], Cell[61597, 1657, 857, 16, 70, "Output",ExpressionUUID->"4b84325b-6031-4158-a1e3-70d0865a3607", CellID->77620149] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)